import jade.core.*;
import jade.core.behaviours.*;
import jade.lang.acl.ACLMessage;
import java.util.*;
import jade.wrapper.*;





public class replicationAgent extends Agent
{
	
	protected void setup()
	{
		
		System.out.println("Hello. My name is "+getLocalName());
		
		jade.core.Runtime runObj = jade.core.Runtime.instance();
		
		System.out.println(runObj);
		
		jade.wrapper.AgentContainer myMC = runObj.createAgentContainer( new ProfileImpl() );

		AgentController a1;
		try
		{

			for(int i=0;i<1;i++)
			{
				a1 = myMC.createNewAgent(getLocalName()+"agent_"+i,"replicationAgent",null);
				a1.start();
			}
		}
		catch(jade.wrapper.StaleProxyException e)
		{
		}
	}

	protected void takeDown()
	{
		//Destrucion of agent goes here
	}
}